import { createApp } from 'vue'
import App from './App.vue'
import installApi from './plugins/api'
import mitt from 'mitt'
import ElementPlus from 'element-plus'
import { setupI18n } from '@/locale/setupI18n';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import '@/assets/css/element-plus-rem.css'
import './index.css'
import '@/assets/css/reset.css'
import '@/assets/css/base.scss'

import router from './router'
import store from './store'
import 'element-plus/dist/index.css'

const app = createApp(App)
app.config.globalProperties.$bus = new mitt()
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
installApi(app)
setupI18n(app)

app.use(router)
app.use(store)
app.use(ElementPlus)
app.mount('#app')